package com.fr.crf;

import java.io.IOException;
import java.util.List;

import com.hankcs.hanlp.model.crf.CRFLexicalAnalyzer;
import com.hankcs.hanlp.model.crf.CRFSegmenter;
import com.hankcs.hanlp.seg.common.Term;

/**
 * @author 付荣
 * @version 创建时间：2018年4月12日 下午1:52:29
 */
public class CrfAnalyzerTest {

	public static void main(String[] args) throws IOException {
		CRFLexicalAnalyzer analyzer = new CRFLexicalAnalyzer();
		CRFSegmenter segment = new CRFSegmenter();
		String [] text = {
				"游天目湖",
				"天目湖我得到的abcd",
				"其它票自动化180352",
		};
		for(String s :text){
			List<Term> seg = analyzer.seg(s);
			System.out.println(s + "\nanalyzer:" + analyzer.analyze(s) +"\nseg:" +analyzer.seg(s));
			System.out.println(s + ":" + seg);
		}
	}
}
